package com.TeacherInfoServer.pojo.excelImport;

import com.alibaba.excel.annotation.ExcelProperty;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class TemporaryPositionExcel {
    @NotNull(message = "工号不能为null")
    @NotEmpty(message = "工号不能为空")
    @Size(min = 10, max = 10, message = "不是有效工号")
    @ExcelProperty(value = "工号",index = 0)
    private String teacherId;
    @ExcelProperty(value = "姓名",index = 1)
    private String teacherName;
    @NotNull(message = "挂职单位不能为null")
    @NotEmpty(message = "挂职单位不能为空")
    @ExcelProperty(value = "挂职单位",index = 2)
    private String unit;
    @NotNull(message = "挂职描述不能为null")
    @NotEmpty(message = "挂职描述不能为空")
    @ExcelProperty(value = "挂职描述",index = 3)
    private String description;
    @NotNull(message = "挂职起始时间不能为null")
    @NotEmpty(message = "挂职起始时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    @ExcelProperty(value = "挂职起始时间",index = 4)
    private String startDate;
    @NotNull(message = "挂职结束时间不能为null")
    @NotEmpty(message = "挂职结束时间不能为空")
    @Pattern(regexp = "^\\d{4}-\\d{1,2}-\\d{1,2}",message = "日期不合法")
    @ExcelProperty(value = "挂职结束时间",index = 5)
    private String endDate;
}
